import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqIntHelper } from "./SeqIntHelper";
type int = number;
//class SExpDice
    
    export  class SExpDice extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SExpDice();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.throwCount);
            arg1.writeInt(this.toModifyCount);
            arg1.writeInt(this.diceMoneyModifyCount);
            arg1.writeInt(this.expValue);
            arg1.writeInt(this.maxDiceNum);
            arg1.writeInt(this.rewardEx);
            arg1.writeInt(this.reword);
            SeqIntHelper.write(arg1, this.dice);
            arg1.writeInt(this.reserve1);
            arg1.writeInt(this.reserve2);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.throwCount = arg1.readInt();
            this.toModifyCount = arg1.readInt();
            this.diceMoneyModifyCount = arg1.readInt();
            this.expValue = arg1.readInt();
            this.maxDiceNum = arg1.readInt();
            this.rewardEx = arg1.readInt();
            this.reword = arg1.readInt();
            this.dice = SeqIntHelper.read(arg1);
            this.reserve1 = arg1.readInt();
            this.reserve2 = arg1.readInt();
            return;
        }

        public /* const */_type: int=292;

        public /* var */throwCount: int;

        public /* var */toModifyCount: int;

        public /* var */diceMoneyModifyCount: int;

        public /* var */expValue: int;

        public /* var */maxDiceNum: int;

        public /* var */rewardEx: int;

        public /* var */reword: int;

        public /* var */dice: Array<any>;

        public /* var */reserve1: int;

        public /* var */reserve2: int;

        public static /* var */_regist: SExpDice;
    }

            SExpDice._regist = new SExpDice(true);
        